package com.bdqn.mapper;

import com.bdqn.pojo.StorageRecord;
import com.bdqn.pojo.SysUser;
import org.mybatis.spring.SqlSessionTemplate;

public class StorageRecordMapperImpl implements StorageRecordMapper{
    private SqlSessionTemplate sqlSession;

    @Override
    public boolean add(StorageRecord str) {
        return sqlSession.getMapper(StorageRecordMapper.class).add(str);
    }

    @Override
    public int del(int id) {
        return sqlSession.getMapper(StorageRecordMapper.class).del(id);
    }

    @Override
    public int upd(int id, String goodsName) {
        return sqlSession.getMapper(StorageRecordMapper.class).upd(id, goodsName);
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }
}
